import request from '@/utils/request'
/**
 * 获取文章详情
 * @param params 
 * @returns 
 */
export const getArticleDetail = (params: any) => {
  return request({
    url: '/anon/note',
    method: 'get',
    params
  })
}
/**
 * 博客点赞
 * @param params 
 * @returns 
 */
export const blogLike = (params: any) => {
  return request({
    url: '/user/note/like',
    method: 'post',
    params
  })
}
/**
 * 博客发表评论
 * @param params 
 * @returns 
 */
export const publishComment = (data: any) => {
  return request({
    url: '/user/comment',
    method: 'post',
    data
  })
}
/**
 * 评论点赞或点踩
 * @param params 
 * @returns 
 */
export const commentLiket = (params: any) => {
  return request({
    url: '/user/comment/like',
    method: 'post',
    params
  })
}
/**
 * 删除评论
 * @param params 
 * @returns 
 */
 export const deleteComment = (params: any) => {
  return request({
    url: '/user/comment',
    method: 'DELETE',
    params
  })
}
/**
 * 发布博客文章
 * @param params 
 * @returns 
 */
export const publishArtcile = (data: any) => {
  return request({
    url: '/user/note',
    method: 'post',
    data
  })
}